﻿using Nancy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wings.Web.Repostory;

namespace Wings.Web
{
    public class HomeModule : NancyModule
    {
        //public BookController
        public HomeModule(IBookRepostory _bookRepostory)
        {
            Get["/"] = _ =>
            {
                var book= _bookRepostory.Query(b => b.Name == "三体").SingleOrDefault();
                return View["Home", book];
            };
        }
    }
}
